package com.dnjn.happiness.emo.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.dnjn.happiness.common.core.web.domain.BaseEntity;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.time.LocalDate;

/**
 * 每日打卡榜单ranklist对象 emo_ranklist
 *
 * @author amber
 * @date 2024-03-05
 */
@Schema(name = "Ranklist", description = "每日打卡榜单ranklist")
@Accessors(chain = true)
@Getter
@Setter
@TableName("emo_ranklist")
public class Ranklist extends BaseEntity {
    private static final long serialVersionUID = 1L;
    /**
     * PK
     */
    @JsonSerialize(using = ToStringSerializer.class)
    @TableId(value = "id", type = IdType.ASSIGN_ID)
    private Long id;

    

    /**
     *
     */
    private Long userId;

    /**
     *
     */
    private String nickName;


    /**
     *
     */
    private Integer totalCount;

    /**
     *
     */
    private Integer lastingCount;


    /**
     * 是否删除|0-否 1-是
     */
    private String deleted;

    private LocalDate lastOperDate;


    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("userId", getUserId())
                .append("createBy", getCreateBy())
                .append("deleted", getDeleted())
                .append("lastingCount", getLastingCount())
                .append("updateBy", getUpdateBy())
                .append("nickName", getNickName())
                .append("id", getId())
                .append("version", getVersion())
                .append("remark", getRemark())
                .append("updateTime", getUpdateTime())
                .append("totalCount", getTotalCount())
                .append("createTime", getCreateTime())
                .toString();
    }
}
